<% if initiative.answered? && translated_attribute(initiative.answer).present? %>
  <% announcement_body = capture do %>
  <h5><%= t("decidim.initiatives.initiatives.result.answer_title") %>:</h5>
  <p>
    <% if initiative.answer_url.present? %>
      <%= link_to initiative.answer_url, target: "_blank", rel: "noopener noreferrer" do %>
        <%= decidim_sanitize_editor translated_attribute initiative.answer %>
      <% end %>
    <% else %>
      <%= decidim_sanitize_editor translated_attribute initiative.answer %>
    <% end %>
  </p>
  <% end %>

  <%= cell("decidim/announcement", { body: announcement_body }, callout_class: "success") %>
<% end %>

<% if initiative.rejected? %>
  <%= cell("decidim/announcement", t("decidim.initiatives.initiatives.result.initiative_rejected_reason"), callout_class: "warning") %>
<% end %>
